﻿
//Author: 张亚涛
//createtime:2015-12-23 22:45:59
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class Park
    {
        public Park()
        { }
        public Park(IDataReader reader)
        {
            _parkID = long.Parse(reader["ParkID"].ToString());
            if (reader["ParkName"] != DBNull.Value)
            {
                _parkName = reader["ParkName"].ToString();
            }
            if (reader["ParentID"] != DBNull.Value)
            {
                _parentID = long.Parse(reader["ParentID"].ToString());
            }
            if (reader["ParentPath"] != DBNull.Value)
            {
                _parentPath = reader["ParentPath"].ToString();
            }
            if (reader["Depth"] != DBNull.Value)
            {
                _depth = int.Parse(reader["Depth"].ToString());
            }
            if (reader["CommuntyID"] != DBNull.Value)
            {
                _communtyID = long.Parse(reader["CommuntyID"].ToString());
            }
        }

        #region 数据库字段
        private long? _parkID;
        private string _parkName;
        private long? _parentID;
        private string _parentPath;
        private int? _depth;
        private long? _communtyID;
        #endregion

        #region 字段属性
        /// <summary>
        /// 停车场ID
        /// </summary>
        public long? ParkID
        {
            set { _parkID = value; }
            get { return _parkID; }
        }
        /// <summary>
        /// 停车场
        /// </summary>
        public string ParkName
        {
            set { _parkName = value; }
            get { return _parkName; }
        }
        /// <summary>
        /// 父ID
        /// </summary>
        public long? ParentID
        {
            set { _parentID = value; }
            get { return _parentID; }
        }
        /// <summary>
        /// 父路径
        /// </summary>
        public string ParentPath
        {
            set { _parentPath = value; }
            get { return _parentPath; }
        }
        /// <summary>
        /// 层级
        /// </summary>
        public int? Depth
        {
            set { _depth = value; }
            get { return _depth; }
        }
        /// <summary>
        /// 小区ID
        /// </summary>
        public long? CommuntyID
        {
            set { _communtyID = value; }
            get { return _communtyID; }
        }
        #endregion
    }
}